package com.lucky.contract.service.iml;

import com.lucky.contract.dao.ConstructMapper;
import com.lucky.contract.entity.Construct;
import com.lucky.contract.entity.ResultMap;
import com.lucky.contract.service.ConstructService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;
import java.util.Map;

@Service
@Transactional
public class ConstructServiceImpl implements ConstructService {

    @Resource
    private ConstructMapper constructMapper;

    @Override
    public ResultMap queryPageList(Map<String, Object> params) throws Exception {
        ResultMap resultMap = new ResultMap();
        List<Construct> constructs = constructMapper.queryByConditions(params);
        long count = constructMapper.queryPageInfo(params);
        resultMap.setData(constructs);
        resultMap.setTotalCount(count);
        return resultMap;
    }

    @Override
    public List queryList(Map<String, Object> params) throws Exception {
        return null;
    }

    @Override
    public Construct getEntity(String pkId) throws Exception {
        return null;
    }

    @Override
    public void addEntity(Construct construct) throws Exception {

    }

    @Override
    public void updateEntity(Construct construct) throws Exception {

    }

    @Override
    public void deleteEntity(String pkId) throws Exception {

    }
}
